From: | Jules |
Date: | 5 Sep 2001 at 15:01:56 |
Subject: | Re: Starting programs, waiting for execution |
Craig Hutchison wrote on Tue, 04 Sep 2001 19:24:26 +1000
about 'Starting programs, waiting for execution'
> Of course. I do exactly that with some of my YAM scripts.
>
> If ~SHOW('P','YAM') THEN DO /* if we find the YAM port, don't do it */
> Say = 'YAM is not running: Opening it NOW!'
> Address Command 'Run <>NIL: YAM:YAM'
> YAMLoaded = 0 /* YAM isn't running */
> Count = 0 /* attempt #1 */
> DO UNTIL YAMLoaded /* do it */
> Call DELAY(200) /* wait for YAM */
> IF SHOW('P','YAM') THEN YAMLoaded = 1
> Else do /* still no, try again */
> Count = Count + 1 /* attempt number */
> If Count = 5 then do /* too many tries */
> Say = 'YAM will NOT run. Exiting!' /* Damn! bye bye..... */
> EXIT 20
> End
> End
> End
> End
>
> Note that YAM's ARexx port is called 'YAM'.
IF ~SHOW('P','YAM') THEN DO
ADDRESS COMMAND 'Run <>NIL: YAM:YAM'
ADDRESS COMMAND 'WAITFORPORT YAM'
IF ~SHOW('P','YAM') THEN EXIT
END
That should also work. I don't use YAM so I don't know how long it takes to
start up, but I would be surprised if it were more than ten seconds.
Jules
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of VeriSign's FREE Guide: "Securing Your Web Site for Business." Get it Now!
http://us.click.yahoo.com/n7RbFC/zhwCAA/yigFAA/saFolB/TM
---------------------------------------------------------------------~->
ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/